Skip to content

fix(logger): defensively collect no git metadata when org returns nothing#453

Open
Alex R (alexr17) wants to merge 2 commits into
mainfrom
fix/git-metadata-defensive-defaults
Open

fix(logger): defensively collect no git metadata when org returns nothing#453
Alex R (alexr17) wants to merge 2 commits into
mainfrom
fix/git-metadata-defensive-defaults

Conversation

@alexr17
Copy link
Copy Markdown

Summary

When the control plane returns no git_metadata configuration, the SDK now collects nothing instead of substituting SDK-side defaults. This eliminates duplicate default maintenance between SDK and control plane and aligns with feedback from the corresponding JS SDK PR.

Changes

  • Removed DEFAULT_GIT_METADATA_FIELDS and default_git_metadata_settings() from git_fields.py
  • Updated logger.py _check_org_info() to fall back to collect="none" when org has no git_metadata
  • Updated gitutil.py get_repo_info() to fall back to collect="none" when settings is None
  • Updated docstrings in framework.py to reflect that collection defers to org-level settings
  • Added tests to verify new behavior

Test plan

  • All 3 new unit tests pass
  • All 448 existing tests in test_core pass
  • No regressions

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a breaking change for self hosted customers? If it is, is that okay?

@alexr17 Alex R (alexr17) force-pushed the fix/git-metadata-defensive-defaults branch from 119d970 to 2085913 Compare May 21, 2026 17:38
@alexr17
Copy link
Copy Markdown
Author

is this a breaking change for self hosted customers? If it is, is that okay?

I'm not sure how breaking it would be but this is the direction we want to go in based on:
braintrustdata/braintrust-sdk-javascript#1972 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants